package com.ihr360.commons.model.base;

import com.ihr360.commons.model.IHierarchyEntity;
import com.ihr360.commons.model.entity.BaseCode;

import java.util.ArrayList;
import java.util.List;


public class Division extends BaseCode<Long> implements IHierarchyEntity<Division, Long> {

    private Country country;
    /**
     * 简称
     */
    private String shortName;

    /**
     * 首字母
     */
    private String initial;

    /**
     * 名称首字母
     */
    private String fullInitial;

    /**
     * 拼音
     */
    private String pinyin;

    private boolean hot = false;

    /**
     * 下级区划列表
     */
    private List<Division> children = new ArrayList<>();

    /**
     * 上级区划
     */
    private Division parent;

    public Division() {
    }

    public Division(Long id) {

    }

    public Division(Long id, String name) {
        this.id = id ;
        this.name = name;
    }

    public Country getCountry() {
        return country;
    }

    public void setCountry(Country country) {
        this.country = country;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getInitial() {
        return initial;
    }

    public void setInitial(String initial) {
        this.initial = initial;
    }

    public String getFullInitial() {
        return fullInitial;
    }

    public void setFullInitial(String fullInitial) {
        this.fullInitial = fullInitial;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public boolean isHot() {
        return hot;
    }

    public void setHot(boolean hot) {
        this.hot = hot;
    }

    @Override
    public List<Division> getChildren() {
        return children;
    }

    @Override
    public void setChildren(List<Division> children) {
        this.children = children;
    }

    @Override
    public Division getParent() {
        return parent;
    }

    @Override
    public void setParent(Division parent) {
        this.parent = parent;
    }

    // TODO
    @Override
    public String getIndexno() {
        return null;
    }
}